{% extends 'base.html' %}
{% block title %}Staff List{% endblock %}
{% block stylesheet %}
{{ block.super }}
{% endblock%}

{% block javascript %}
{{ block.super }}
<script type="text/javascript" src="{% url base_static "js/jquery.tablesorter.min.js" %}"></script>
<script type="text/javascript">
$(document).ready(function(){
    $("table.list tr:even").addClass("even");
});
</script>
{% endblock%}
{% block content %}
<h3>Staff List</h3>

<div id="navi">
    <ul>
        <li><a href="{% url staff_create %}">staff create</a></li>
    </ul>
</div>

<table class="tablesorter list">
    <tr>
        <th>이름</th>
        <th>성</th>
        <th>mobile phone</th>
    </tr>
{% for staff in staffs %}
    <tr>
        <td><a href="{% url staff_detail staff.id%}">{{ staff.first_name }}</a></td>
        <td>{{ staff.second_name }}</td>
        <td>{{ staff.mobilephone|default_if_none:"-" }}</td>
    </tr>
{% endfor %}
</table>

{% endblock %}